<template>
  <div>
    <el-breadcrumb separator>
      <el-breadcrumb-item class="line" :to="{ path: $route.path }">
        {{
        $route.meta.title
        }}
      </el-breadcrumb-item>
      <el-button plain class="right">
        <a @click="close">
          <i class="el-icon-close"></i>
          关闭
        </a>
      </el-button>
      <el-button plain class="right">
        <a @click="shuaxin">
          <i class="el-icon-refresh"></i>
          刷新
        </a>
      </el-button>
    </el-breadcrumb>
    <div class="iconImg">
      <el-steps :active="1" align-center>
        <el-step title="提交订单" description="2018-07-19 15:43:23">
          <i class="el-icon-check" slot="icon" />
        </el-step>
        <el-step title="支付订单" description="2018-07-19 15:43:23">
          <i class="el-icon-check" slot="icon" />
        </el-step>
        <el-step title="平台发货" description="2018-07-19 15:43:23">
          <i class="el-icon-check" slot="icon" />
        </el-step>
        <el-step title="确认收货" description>
          <i class="el-icon-time" slot="icon" />
        </el-step>
        <el-step title="完成评价" description>
          <i class="el-icon-time" slot="icon" />
        </el-step>
      </el-steps>
    </div>
    <div>
      <el-breadcrumb separator>
        <span>
          <div class="leftTop">
            <i class="el-icon-warning-outline"></i>
            当前订单状态：
            <span v-if="statusData.orderStatus==0">待付款</span>
            <span v-if="statusData.orderStatus==1">待发货</span>
            <span v-if="statusData.orderStatus==2">已发货</span>
            <span v-if="statusData.orderStatus==3">已完成</span>
            <span v-if="statusData.orderStatus==4">已关闭</span>
          </div>
          <div class="rightTop">
            <el-button @click="updateInvoice">修改发票信息</el-button>
            <el-button @click="updateShou">修改收货人信息</el-button>
            <el-button @click="updateGood">修改商品信息</el-button>
            <el-button @click="updateCost">修改费用信息</el-button>
            <el-button @click="sendMessage">发送站内信</el-button>
            <el-button @click="noteOrder(1)">关闭订单</el-button>
            <el-button @click="noteOrder(2)">备注订单</el-button>
          </div>
        </span>
      </el-breadcrumb>
      <!-- 基本信息 -->
      <el-container>
        <el-main>
          <el-container class="parent-body">
            <el-header class="content-header">
              <i class="el-icon-collection-tag"></i> 基本信息
            </el-header>
            <el-main class="info-main padding-style">
              <el-table :data="baseData" border>
                <el-table-column prop="transactionId" label="订单编号" width="300"></el-table-column>
                <!-- 暂没找到匹配数据 -->
                <el-table-column prop="shippingCode" label="发货单流水号" width="80"></el-table-column>
                <el-table-column prop="userId" label="用户账号"></el-table-column>
                <el-table-column prop="payType" label="支付方式">
                  <template scope="scope">
                    <p v-if="scope.row.payType==0">货到付款</p>
                    <p v-if="scope.row.payType==1">在线支付</p>
                  </template>
                </el-table-column>

                <el-table-column prop="sourceType" label="订单来源">
                  <template scope="scope">
                    <p v-if="scope.row.sourceType==1">web</p>
                    <p v-if="scope.row.sourceType==2">app</p>
                    <p v-if="scope.row.sourceType==3">微信公众号</p>
                    <p v-if="scope.row.sourceType==4">微信小程序</p>
                    <p v-if="scope.row.sourceType==5">H5手机页面</p>
                  </template>
                </el-table-column>
                <!-- 暂没找到匹配数据 -->
                <el-table-column prop="orderType" label="订单类型" width="100"></el-table-column>
                <!-- 暂没找到匹配数据 -->
                <el-table-column prop="sendWay" label="配送方式" width="100"></el-table-column>
                <el-table-column prop="shippingCode" label="物流单号"></el-table-column>

                <el-table-column prop label="自动确认收货时间" width="80">{{configData.takeTimeout}}天</el-table-column>
                <el-table-column prop="actiMessage" label="活动信息" width="160"></el-table-column>
              </el-table>
            </el-main>
          </el-container>
        </el-main>
      </el-container>
      <!-- 收货人信息 -->
      <el-container>
        <el-main>
          <el-container class="parent-body">
            <el-header class="content-header">
              <i class="el-icon-collection-tag"></i> 收货人信息
            </el-header>
            <el-main class="info-main padding-style">
              <el-table :data="shouData" border>
                <el-table-column prop="receiverContact" label="收货人"></el-table-column>
                <el-table-column prop="receiverMobile" label="手机号码"></el-table-column>
                <el-table-column prop="postNumber" label="邮政编码"></el-table-column>
                <el-table-column prop="receiverAddress" label="收货地址"></el-table-column>
              </el-table>
            </el-main>
          </el-container>
        </el-main>
      </el-container>
      <!-- 商品信息 -->
      <el-container>
        <el-main>
          <el-container class="parent-body">
            <el-header class="content-header">
              <i class="el-icon-collection-tag"></i> 商品信息
            </el-header>
            <el-main class="info-main padding-style">
              <el-table :data="goodData" border>
                <el-table-column label="商品图片">
                  <template slot-scope="scope">
                    <el-image style="width: 100px; height: 100px" :src="scope.row.skuVo.image"></el-image>
                  </template>
                </el-table-column>
                <el-table-column prop="name" label="商品名称"></el-table-column>
                <!-- 在库存表拿 -->
                <el-table-column prop="skuVo.price" label="价格/货号"></el-table-column>
                <el-table-column prop="skuVo.spec" label="属性">
                    <template scope="scope" >
                    
                    <p><span>{{scope.row.skuVo.spec[0].label}},</span> <span>{{scope.row.skuVo.spec[0].value}}</span></p>
                <p><span>{{scope.row.skuVo.spec[1].label}},</span> <span>{{scope.row.skuVo.spec[1].value}}</span></p>
                    </template>

                </el-table-column>
                <!-- 目前就获取这个信息 其他需要库存表-->
                <el-table-column prop="num" label="数量"></el-table-column>

                <el-table-column prop="skuVo.repertory" label="库存"></el-table-column>
                <!-- 目前就获取这个信息 -->
                <el-table-column prop="money" label="小计"></el-table-column>
              </el-table>
            </el-main>
            <el-footer class="info-foot">
              <div class="paging-style">
                合计：¥
                <span class="redFont">{{totoMany}}</span>
              </div>
            </el-footer>
          </el-container>
        </el-main>
      </el-container>
      <!-- 费用信息 -->
      <el-container>
        <el-main>
          <el-container class="parent-body">
            <el-header class="content-header">
              <i class="el-icon-collection-tag"></i> 费用信息
            </el-header>
            <el-main class="info-main padding-style">
              <el-table :data="costData" border>
                <el-table-column label="商品合计">￥{{ costData.totalNum }}</el-table-column>
                <el-table-column prop="postFee" label="运费"></el-table-column>
                <!-- 暂无匹配数据 -->
                <el-table-column prop label="优惠券"></el-table-column>
                <el-table-column prop="preMoney" label="活动优惠"></el-table-column>
                <el-table-column label="订单总金额">
                  ￥
                  <span class="redFont">{{costData.totalMoney}}</span>
                </el-table-column>
                <el-table-column label="应付款金额">
                  ￥
                  <span class="redFont">{{costData.totalMoney}}</span>
                </el-table-column>
              </el-table>
            </el-main>
          </el-container>
        </el-main>
      </el-container>
      <!-- 操作信息 -->
      <el-container>
        <el-main>
          <el-container class="parent-body">
            <el-header class="content-header">
              <i class="el-icon-collection-tag"></i> 操作信息
            </el-header>
            <el-main class="info-main padding-style">
              <el-table :data="operatData" border>
                <el-table-column prop="operater" label="操作者"></el-table-column>
                <el-table-column prop="operateTime" label="操作时间"></el-table-column>
                <el-table-column prop="orderStatus" label="订单状态">
                      <template scope="scope">
            <span v-if="scope.row.orderStatus==0">待付款</span>
            <span v-if="scope.row.orderStatus==1">待发货</span>
            <span v-if="scope.row.orderStatus==2">已发货</span>
            <span v-if="scope.row.orderStatus==3">已完成</span>
            <span v-if="scope.row.orderStatus==4">已关闭</span>
                      </template>
                </el-table-column>
                <el-table-column prop="payStatus" label="付款状态"></el-table-column>
                <el-table-column prop="consignStatus" label="发货状态"></el-table-column>
                <el-table-column prop="remarks" label="备注"></el-table-column>
              </el-table>
            </el-main>
          </el-container>
        </el-main>
      </el-container>
    </div>


     <!-- 关闭订单 -->
    <div>
      <el-dialog
        :title="关闭订单"
        :close-on-click-modal="false"
        :visible.sync="dialogVisible"
      >
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-form-inline">
          <el-form-item label="操作备注">
            <el-input v-model="ruleForm.remarks" type="textarea" :rows="10"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="operateclass(ruleForm)">确定</el-button>
            <el-button @click="dialogVisible = false">取消</el-button>
          </el-form-item>
        </el-form>
      </el-dialog>
    </div>
    <!-- 备注订单 -->
    <div>
      <el-dialog
        :title="备注订单"
        :close-on-click-modal="false"
        :visible.sync="LogTwo"
      >
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-form-inline">
          <el-form-item label="操作备注">
            <el-input v-model="ruleForm.remarks" type="textarea" :rows="10"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="operateclassTwo(ruleForm)">确定</el-button>
            <el-button @click="LogTwo = false">取消</el-button>
          </el-form-item>
        </el-form>
      </el-dialog>
    </div>
    <!-- 发送站内信 -->
    <div>
      <el-dialog :title="'发送站内信'" :close-on-click-modal="false" :visible.sync="visible">
        <el-form :model="Form" :rules="rules2" ref="Form" class="demo-form-inline">
          <el-form-item label="标题">
            <el-input v-model="ruleForm.title"></el-input>
          </el-form-item>
          <el-form-item label="内容">
            <el-input v-model="ruleForm.content" type="textarea" :rows="6"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="submitForm(Form)">确定</el-button>
            <el-button @click="visible = false">取消</el-button>
          </el-form-item>
        </el-form>
      </el-dialog>
    </div>
    <!-- 修改费用信息 -->
    <div>
      <el-dialog :title="'修改费用信息'" :close-on-click-modal="false" :visible.sync="Costvisible">
        <el-table :data="costData" height="250" border style="width: 100%">
          <el-table-column label="商品合计" width="130">￥{{ allPrice }}</el-table-column>
          <el-table-column label="运费" width="130">
            <el-input v-model="costData.Freight" placeholder="￥0.00"></el-input>
          </el-table-column>
          <el-table-column prop="coupon" label="优惠券" width="130"></el-table-column>
          <el-table-column prop="Deduct" label="匠币抵扣" width="130"></el-table-column>
          <el-table-column prop="actiDiscount" label="活动优惠" width="130"></el-table-column>
          <el-table-column label="折扣金额" width="130">
            <el-input v-model="costData.discountMoney" placeholder="￥0.00"></el-input>
          </el-table-column>
          <el-table-column label="订单总金额" width="130">
            ￥
            <span class="redFont">{{ orderPrice }}</span>
          </el-table-column>
          <el-table-column label="应付款金额" width="130">
            ￥
            <span class="redFont">{{ amountPayable }}</span>
          </el-table-column>
          <el-footer class="info-foot">
            <el-button type="primary" @click="submitForm(costData)">确定</el-button>
            <el-button @click="Costvisible = false">取消</el-button>
          </el-footer>
        </el-table>
      </el-dialog>
    </div>
    <!-- 修改发票信息 -->
    <div>
      <el-dialog :title="'修改发票信息'" :close-on-click-modal="false" :visible.sync="Invoicevisible">
        <el-form :label-position="right" label-width="120px" :model="InvoiceData">
          <el-form-item label="* 发票类型： ">
            <el-select v-model="InvoiceData.type" placeholder="电子发票">
              <el-option label="不开发票" value="noInvoice"></el-option>
              <el-option label="电子发票" value="electronicInvoice"></el-option>
              <el-option label="纸质发票" value="paperInvoice"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="* 发票抬头： ">
            <el-input v-model="InvoiceData.begin"></el-input>
          </el-form-item>
          <el-form-item label="* 发票内容">
            <el-select v-model="InvoiceData.content" placeholder="日用品">
              <el-option label="日用品" value="dayGood"></el-option>
              <el-option label="家居用品" value="homeGood"></el-option>
              <el-option label="食品" value="eatGood"></el-option>
              <el-option label="酒/饮料" value="liquor"></el-option>
              <el-option label="服饰" value="apparel"></el-option>
              <el-option label="化妆品" value="makeup"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="* 收票人手机：">
            <el-input v-model="InvoiceData.telPhone"></el-input>
          </el-form-item>
          <el-form-item label="* 收票人邮箱：">
            <el-input v-model="InvoiceData.mail"></el-input>
          </el-form-item>
        </el-form>
        <el-footer class="info-foot">
          <el-button type="primary" @click="submitForm(costData)">确定</el-button>
          <el-button @click="Invoicevisible = false">取消</el-button>
        </el-footer>
      </el-dialog>
    </div>
    <!-- 修改收货人信息 -->
    <div>
      <el-dialog :title="'修改收货人信息'" :close-on-click-modal="false" :visible.sync="Shouvisible">
        <el-form
          :label-position="right"
          label-width="120px"
          :model="shouDataTwo"
          :rules="rules3"
          ref="shouDataTwo"
        >
          <el-form-item label="* 收货人姓名：">
            <el-input v-model="shouDataTwo.receiverContact"></el-input>
          </el-form-item>
          <el-form-item label="* 手机号码：">
            <el-input v-model="shouDataTwo.receiverMobile"></el-input>
          </el-form-item>
          <el-form-item label="* 邮政编码：">
            <el-input v-model="shouDataTwo.postNumber"></el-input>
          </el-form-item>
          <!-- 省市区需要去连区域设置的地区码，这里暂时没有 -->
          <!-- <el-form-item label="* 所在区域">
            <span>
              <el-select
                v-model="value1"
                multiple
                placeholder="省"
                style="width: 90px"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>

              <el-select
                v-model="value2"
                multiple
                collapse-tags
                style="width: 90px"
                placeholder="市"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>

              <el-select
                v-model="value3"
                multiple
                collapse-tags
                style="width: 90px"
                placeholder="区"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </span>
          </el-form-item>-->
          <el-form-item label="* 详细地址：">
            <el-input v-model="shouDataTwo.receiverAddress" type="textarea" :rows="3"></el-input>
          </el-form-item>
        </el-form>
        <el-footer class="info-foot">
          <el-button type="primary" @click="submitForm(shouDataTwo)">确定</el-button>
          <el-button @click="Shouvisible = false">取消</el-button>
        </el-footer>
      </el-dialog>
    </div>
  </div>
</template>
<script>
import orderListApi from "@/api/order/orderlist";
import item from "@/api/order/orderItem";
import orderConfig from "@/api/order/orderConfig";
import orderLog from "@/api/order/orderLog";
export default {
  data() {
    return {


      // 获取传过来的id
      id:'',
      // 操作数据待提交存放处
      operate: {
        operater: "",
        orderId: "",
        orderStatus: "",
        payStatus: "",
        consignStatus: "",
        remarks:""
      },
      // 操作订单关闭
      operateColse:{
        id:'',
        orderStatus:'4',
      },
      // ids
      ids: [],
      // 配置表的信息
      configData: {},
      // 订单状态
      statusData: "",
      // 合计
      totoMany: "",
      // 临时form
      formshuju: {
        id: "",
        receiverContact: "",
        receiverMobile: "",
        postNumber: "",
        receiverAddress: ""
      },
      //
      i: 2,
      allPrice: 0,
      orderPrice: 0,
      amountPayable: 0,
      labelPosition: "right",
      Invoicevisible: false,
      Shouvisible: false,
      Costvisible: false,
      dialogVisible: false,
      visible: false,

      ruleForm: {
       remarks: "",
      },
      rules: {
       remarks: [
          { required: true, message: "请输入操作备注", trigger: "blur" },
          { max: 200, message: "长度在200个字符以内", trigger: "blur" }
        ]
      },
      Form: {
        title: "",
        content: ""
      },
      rules2: {
        title: [
          { required: true, message: "请输入标题", trigger: "blur" },
          { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
        ],
        content: [
          { required: true, message: "请输入内容", trigger: "blur" },
          { max: 200, message: "长度在200个字符以内", trigger: "blur" }
        ]
      },
      baseData: [],
      shouData: [],
      shouDataTwo: {
        id: "",
        receiverContact: "",
        receiverMobile: "",
        postNumber: "",
        receiverAddress: ""
      },
      // 数据框提示
      rules3: {
        receiverContact: [
          { required: true, message: "模板名称不能为空", trigger: "blur" }
        ],
        receiverMobile: [
          { required: true, message: "请输入内容", trigger: "blur" },
          { max: 200, message: "长度在200个字符以内", trigger: "blur" }
        ]
      },
      goodData: [],
      costData: [],
      operatData: [
        // {
        //   role: "用户",
        //   dateTime: "2018-07-19 15:43:23",
        //   orderStatus: "已完成",
        //   payStatus: "已支付",
        //   outStatus: "已发货",
        //   note: "完成商品评价"
        // },
        // {
        //   role: "用户",
        //   dateTime: "2018-07-19 15:43:23",
        //   orderStatus: "已完成",
        //   payStatus: "已支付",
        //   outStatus: "已发货",
        //   note: "手动确认收货"
        // },
        // {
        //   role: "系统",
        //   dateTime: "2018-07-19 15:43:23",
        //   orderStatus: "已完成",
        //   payStatus: "已支付",
        //   outStatus: "已发货",
        //   note: "自动确认收货"
        // },
        // {
        //   role: "admin",
        //   dateTime: "2018-07-19 15:43:23",
        //   orderStatus: "已完成",
        //   payStatus: "已支付",
        //   outStatus: "已发货",
        //   note: "完成发货"
        // }
      ],
      InvoiceData: [
        {
          type: "electronicInvoice",
          begin: "",
          content: "",
          telPhone: "",
          mail: ""
        }
      ],
      options: [
        {
          value: "选项1",
          label: "四川"
        },
        {
          value: "选项2",
          label: "江油"
        },
        {
          value: "选项3",
          label: "武侯区"
        },
        {
          value: "选项4",
          label: "江油"
        },
        {
          value: "选项5",
          label: "高新区"
        }
      ],
      value1: [],
      value2: [],
      value3: []
    };
  },
  mounted() {
    this.init();
    // 获取的id
    var id = parseInt(this.$route.query.id);
    this.id=id;
    var transactionId = parseInt(this.$route.query.transactionId);
    this.intdataOne(id);
    this.intdataTwo(id);
    this.intdatathree(id);
    this.config();
    this.getLog(id);
  },
  methods: {
    init() {
      this.costData.forEach(item => {
        if (item != null) {
          this.orderPrice = Number(this.allPrice) + Number(item.Freight);
          this.amountPayable =
            Number(this.orderPrice) -
            Number(item.coupon) -
            Number(item.actiDiscount) -
            Number(item.discountMoney) -
            Number(item.Deduct);
        }
      });
      this.$nextTick(() => {});
    },
    shuaxin() {
      this.$router.go(0);
    },
    close() {
      this.$router.go(-1);
    },
    orderTrack() {
      let routeData = this.$router.resolve({
        name: "orderTrack"
      });
      window.open(routeData.href, "_blank");
    },
    noteOrder(i) {
      this.i = i;
      if(this.i=1){

  this.dialogVisible = true;
      }
    if(this.i=2){
      this.dialogVisible2=true;
    }
    },
    submitForm(form) {
      console.log(form);
      this.formshuju.id = form.id;
      this.formshuju.receiverContact = form.receiverContact;
      this.formshuju.receiverMobile = form.receiverMobile;
      this.formshuju.postNumber = form.postNumber;
      this.formshuju.receiverAddress = form.receiverAddress;
      // 进行修改操作
      console.log(this.formshuju);
      this.updateOne(this.formshuju);
    },

// 关闭订单
    operateclass(form){

this.operate.remarks=form.remarks;


  this.addLogApi(this.operate);
  // 关闭订单

  
   
   this.operateColse.id=this.id;

   console.log(this.operateColse);
   this.updateOne(this.operateColse);


    },
// 备注订单
        operateclassTwo(form){

this.operate.remarks=form.remarks;

console.log(this.operate);
  this.addLogApi(this.operate);
 
  // this.getLog(this.id);
 
    },



    sendMessage() {
      this.visible = true;
    },
    updateInvoice() {
      this.Invoicevisible = true;
    },
    updateShou() {
      this.Shouvisible = true;
      var id = parseInt(this.$route.query.id);
      this.intdataTwoA(id);
    },
    updateGood() {
      // 获取的id
      var id = parseInt(this.$route.query.id);
      this.$router.push({
        path: "/order/updateGoodMessage",
        query: { orderId: id, totoMany: this.totoMany }
      });
    },
    updateCost() {
      this.Costvisible = true;
    },
    //  基本信息
    intdataOne(id) {
      orderListApi.selectById(id).then(response => {
        console.log(response);
        var data = JSON.parse(JSON.stringify(response.data.data));
        console.log(data);
        this.statusData = response.data.data;
        // 数据渲染这样才能渲染组件的东东
        this.baseData.push(data);
        this.totoMany = data.totalMoney;
        this.costData.push(data);
        // 准备好的待提交操作数据
        this.operate.operater = "大帅哥";
        this.operate.orderId = data.id;
        this.operate.orderStatus = data.orderStatus;
        this.operate.payStatus = data.payStatus;
        this.operate.consignStatus = data.consignStatus;
        console.log(this.operate);
      });
    },
    //  收货人信息
    intdataTwo(id) {
      orderListApi.selectById(id).then(response => {
        console.log(response);
        var data = JSON.parse(JSON.stringify(response.data.data));
        console.log(data);

        // 数据渲染这样才能渲染组件的东东
        this.shouData.push(data);
      });
    },
    // 修改收货人信息的查看
    intdataTwoA(id) {
      orderListApi.selectById(id).then(response => {
        console.log(response);
        var data = JSON.parse(JSON.stringify(response.data.data));
        console.log(data);
        this.shouDataTwo.id = data.id;
        this.shouDataTwo.receiverContact = data.receiverContact;
        this.shouDataTwo.receiverMobile = data.receiverMobile;
        this.shouDataTwo.postNumber = data.postNumber;
        this.shouDataTwo.receiverAddress = data.receiverAddress;
      });
    },
    //  商品信息
    intdatathree(orderId) {
      this.ids[0] = orderId;
      item.getByIdList(this.ids).then(response => {
        console.log(response);
        var data = JSON.parse(JSON.stringify(response.data.data));
        console.log(data);
        this.goodData =data[0].list;

        this.goodData.forEach((item,index)=>{

          let specJson=[];
if(item.skuVo.spec){

  specJson=JSON.parse(item.skuVo.spec);
  console.log(specJson);
}

this.goodData[index].skuVo.spec=specJson;

        })
        // this.goodData.push(data);
      });
    },
    // 修改单条信息
    updateOne(from) {
      orderListApi.updateOne(from).then(reponse => {
        console.log(reponse.data.message);
        this.$router.go(0);
      });
    },
    // 获取配置表信息
    config() {
      orderConfig.getById().then(reponse => {
        console.log(reponse);
        this.configData = reponse.data.data;
      });
    },
    // 获取到操作信息

    getLog(orderId) {
      orderLog.getById(orderId).then(response => {
        console.log(response);
        var data = JSON.parse(JSON.stringify(response.data.data));
        this.operatData = data;
      });
    },

    // 添加操作日志
    addLogApi(logone){
       orderLog.addOneLog(logone).then(response => {
console.log(response);
         this.$message(response.data.message);
       })
    }
  }
};
</script>
<style scoped>
.iconImg {
  text-align: center;
  font-size: 18px;
}
.leftTop {
  color: red;
  float: left;
  margin-left: 40px;
  text-align: center;
  font-size: 16px;
}
.rightTop {
  float: right;
  margin-right: 20px;
  text-align: center;
}
.redFont {
  color: red;
}
.paging-style {
  height: 60px;
  width: 300px;
  margin: auto;
  padding: auto;
}
</style>
